<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="../favicon.ico" />
    <link rel="stylesheet" href="../css/style.css">
    <title>Nothing</title>

</head>
<body>
    <div style="width: 60vw;margin: auto;margin-top: 20vh;">
        <h1 id="title" style="text-align: center;overflow-wrap: break-word;">提示</h1>
        <p id="content" style="width: 80%;margin: auto;text-align: left;overflow-wrap: break-word;margin-top: 1em;"></p>
    </div>

    <script>
        console.log(window.location.href);
        const param1 = window.location.href.match(/.html\?([^&]*([=][^&]*)?&)*title=([^&]*)&?/);
        const param2 = window.location.href.match(/.html\?([^&]*([=][^&]*)?&)*content=([^&]*)&?/);
        console.log(param1);
        console.log(param2);
        if (!param2)
        {
            alert("错误");
            // window.location.href = "/index.html";
        }

        let title = "";
        if (!param1)
            title = "提示";
        else
            title = param1[3];
        
        const content = param2[3];
        document.getElementById("title").innerHTML = decodeURI(title);
        document.getElementById("content").innerHTML = decodeURI(content);

    </script>
</body>
</html>


